import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// CRM产品-产品计划-【新增编辑】
export function addOrEdit(data) {
  return request({
    url: "/sysCrm/timeSlot/v1.0.0/addOrEdit",
    method: "post",
    data: data,
  });
}
// CRM产品-产品计划-【删除】
export function delById(id) {
  return request({
    url: "/sysCrm/timeSlot/v1.0.0/delById",
    method: "get",
    params: { 
      id:parseStrEmpty(id)
    }
  });
}
// CRM产品-CRM产品计划详情查询
export function queryById(id) {
  return request({
    url: "/sysCrm/timeSlot/v1.0.0/queryById",
    method: "get",
    params: { 
      id:parseStrEmpty(id)
    }
  });
}

// CRM产品-【产品计划】分页查询
export function queryCrmProductTimeSlotByPage(data) {
  return request({
    url: "/sysCrm/timeSlot/v1.0.0/queryCrmProductTimeSlotByPage",
    method: "post",
    data: data,
  });
}

// CRM产品-默认单价查询（新增时使用）
export function queryPriceMoney(id) {
  return request({
    url: "/sysCrm/timeSlot/v1.0.0/queryPriceMoney",
    method: "get",
    params: { 
      productId :parseStrEmpty(id)
    }
  });
}